package com.hanthink.web.controller.app.my;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.hanthink.common.constant.HttpStatus;
import com.hanthink.common.core.controller.BaseController;
import com.hanthink.common.core.page.TableDataInfo;
import com.hanthink.system.domain.repair.MyCallRecordMessage;
import com.hanthink.system.service.repair.IMyCallRecordService;

/**
 * @author Administrator 我的报修信息操作类
 */
@RestController
@RequestMapping("/app/my")
public class MyCallRecordControll extends BaseController {

	@Autowired
	private IMyCallRecordService myCallRecordService;

	// 查询信息列表
	@PostMapping("/callRecord/list")
	public TableDataInfo list(@RequestBody MyCallRecordMessage info) {
		startPage();
		List<MyCallRecordMessage> list = myCallRecordService.SelectRecordMessage(info);
		return getDataTable(list);

		}

	// 查询图表信息
	@PostMapping("/callRecord/charMessage")
	public TableDataInfo SelectCharMessage(@RequestBody MyCallRecordMessage info) {
		TableDataInfo rspData = new TableDataInfo();
		rspData.setRows(myCallRecordService.SelectCharMessage(info));
		rspData.setCode(HttpStatus.SUCCESS);
		rspData.setMsg("操作成功");
		return rspData;
	}
}
